﻿<ui:View x:Class="Coolzon.UI.ViewerApp.Views.LoginView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:ui="clr-namespace:Coolzon.UI.Core.Views;assembly=Coolzon.UI.Core"
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="800">
    <ui:View.Resources>
        <Style x:Key="v-btn-login" TargetType="Button">
            <Setter Property="Height" Value="40"/>
            <Setter Property="Foreground" Value="White"/>
            <!--修改模板属性-->
            <Setter Property="Template">
                <Setter.Value>
                    <!--控件模板-->
                    <ControlTemplate TargetType="Button">
                        <!--背景色-->
                        <Border CornerRadius="4" BorderThickness="1" BorderBrush="#66FFFFFF">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFF36A36" Offset="0"/>
                                    <GradientStop Color="#FFF34604" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.Background>
                            <!--按钮内容-->
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Content="{TemplateBinding Content}">
                            </ContentPresenter>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </ui:View.Resources>
    <Grid>
        <Grid.Background>
            <ImageBrush ImageSource="/Coolzon.UI.ViewerApp;component/Images/logon-bg.jpg" Stretch="UniformToFill"/>
        </Grid.Background>

        <Grid Name="_ctlBorderLogin"  HorizontalAlignment="Center" VerticalAlignment="Center"  Visibility="Visible" Width="300" Height="300" >
            <StackPanel>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Image Source="..\Images\logo.png" Grid.Column="0" Stretch="Fill" Width="52" Height="52"/>
                    <TextBlock Text="用户登录" Margin="10,0,0,0" Grid.Column="1" FontSize="28" Foreground="White" VerticalAlignment="Bottom"/>
                </Grid>
                <Border Background="#4c737373" Padding="10,5,10,5" Margin="0,20,0,0" CornerRadius="5">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Image Source="..\Images\icon-account.png" Grid.Column="0"/>
                        <Rectangle Grid.Column="1" Fill="#85CEE0" Width="1" Margin="5,3,0,3"/>
                        <Rectangle Grid.Column="2" Fill="#437B90" Width="1" Margin="0,3,5,3"/>
                        <TextBox Name="_ctlEditAccount" Height="30" Text="admin" Background="{x:Null}" Grid.Column="3" FontSize="20" Foreground="#FFEFEFEF" BorderThickness="0"/>
                    </Grid>
                </Border>
                <Border Background="#4c737373" Padding="10,5,10,5" Margin="0,20,0,0" CornerRadius="5">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Image Source="..\Images\icon-password.png" Grid.Column="0"/>
                        <Rectangle Grid.Column="1" Fill="#85CEE0" Width="1" Margin="5,3,0,3"/>
                        <Rectangle Grid.Column="2" Fill="#437B90" Width="1" Margin="0,3,5,3"/>
                        <PasswordBox x:Name="_ctlEditPassword" Height="30" Background="{x:Null}" Grid.Column="3" FontSize="20" Foreground="#FFEFEFEF" BorderThickness="0"/>
                    </Grid>
                </Border>
                <Grid HorizontalAlignment="Stretch" Margin="0,30,0,0">
                    <Button Name="ctlBtnOK" Content="登    录" FontSize="16" HorizontalAlignment="Stretch" Click="ctlBtnOK_Click" IsDefault="True" Style="{StaticResource v-btn-login}">
                    </Button>
                </Grid>
            </StackPanel>
        </Grid>
        <Border Name="_ctlBorderIndicator" BorderBrush="Blue" BorderThickness="1" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5" Visibility="Hidden">
            <TextBlock Text="认证中..." Margin="50,20,50,20"/>
        </Border>
    </Grid>
</ui:View>
